DISCUSSION
The
ATSUNextCursorPosition function determines the edge offset in backing store memory corresponding to the previous cursor position based on the type of cursor movement specified in the
iMovementType parameter. You should call
ATSUNextCursorPosition and the function
ATSUPreviousCursorPosition if the initial edge offset is not at a line boundary. If the initial edge offset is at a line direction boundary, you should instead call the functions
ATSURightwardCursorPosition and
ATSULeftwardCursorPosition to calculate the next and previous cursor positions. Note that at a line boundary, the caret is split into a high and low caret.
Note that you may not be able to move the cursor 2-bytes, since doing so might place the cursor in the middle of a surrogate pair.